﻿namespace CodingExercises._11_20;

public class ReadUntilEndMarker
{
    // 读取字符串直到结束标记
    public static string Method(string input)
    {
        // input ="hello there_END_my programmer"
        var markerIndex = input.IndexOf("_END_");
        if (markerIndex == -1)
        {
            return input;
        }

        return input.Substring(0, markerIndex);
    }
}